<template>
	<!-- 客服中心-分类问题（学生） -->
	<view>
		<!-- 操作问题 -->
		<view class="issue">
			<view class="leftGreen"></view>
			<text v-if="type==1">练习问题</text>
			<text v-if="type==2">奖励问题</text>
			<text v-if="type==3">软件问题</text>
			<text v-if="type==4">操作问题</text>
			<text v-if="type==5">我要投诉</text>
		</view>

		<!-- 操作问题列表 -->
		<view class="issueList">
			<!-- 常见问题每一项 -->
			<navigator hover-class="none" :url="'./matter-detail?item='+ encodeURIComponent(JSON.stringify(item))" class="issueListItme"
			 v-for="(item,index) in datas" :key="index">
				<view class="title">
					<view class="circle"></view>
					<text>{{item.questionTitle}}</text>
				</view>
				<view class="iconfont iconfanhui">
				</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				datas: [],
				type: ''
			}
		},
		onLoad(e) {
			var type = e.type;
			this.type = type;
			this.getLists(type)
		},
		methods: {
			getLists: function(type) {
				this.$kapi.apiPost('customerService/selQuestionTypeInfo', {
					typeId: type,
					reqMethod: 1
				}).then(res => {
					var data = res.data;
					if (data.code == 200) {
						this.datas = data.date.serviceQuestionList;
					} else {
						uni.showToast({
							title: data.msg,
							icon: 'none'
						});
					}
				});
			}
		}
	}
</script>

<style>
	/* 操作问题 */
	.issue {
		display: flex;
		align-items: center;
		margin-top: 56upx;
		margin-left: 30upx;
	}

	.issue text {
		font-size: 32upx;
		font-weight: bold;
		color: #333333;
	}

	.leftGreen {
		width: 10upx;
		height: 36upx;
		background: #FF9900;
		margin-right: 20upx;
	}

	.issueItme {
		text-align: center;
		width: 20%;
		height: 140upx;
		font-size: 24upx;
		color: #333333;
		line-height: 70upx;
		display: flex;
		align-items: center;
		flex-direction: column;
	}

	.issueImg {
		display: block;
		width: 80upx;
		height: 80upx;
		vertical-align: middle;
	}

	.gray {
		margin-top: 60upx;
		width: 100vw;
		height: 20upx;
		background: #EEEEEE;
	}

	/* 常见问题列表 */
	.issueList {
		font-size: 24upx;
		color: #666666;
		line-height: 80upx;
		padding: 0 50upx;
	}

	/* 操作问题每一项 */
	.issueListItme {
		width: 650upx;
		height: 36upx;
		margin-top: 40upx;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.issueListItme .title {
		font-size: 24upx;
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}

	/* 圆点 */
	.circle {
		width: 8upx;
		height: 8upx;
		background: #ccc;
		border-radius: 50%;
	}

	.issueListItme text {
		margin-left: 16upx;
	}

	.iconfanhui {
		font-size: 24upx;
		color: #999999;
	}
</style>
